STEP 9: How often the did the user choose a? It's time to check the list storing the user's answers!

  • Click LOGIC, then and drag Get Count to the bottom of your program OUTSIDE of the loop.
  • Change the name of the variable that stores the count from my_var to a_num.
  • Change the list assigned to .count() to user_choices and change the argument to the string "a".

We are now storing the amount of times the user entered "a" in the variable a_num!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)